package com.yanliang.SqlSession;

import com.yanliang.pojo.Configuration;

/**
 * SqlSessionFactory 默认实现类
 *
 * @Author : yanliang
 * @Data : 3/25/2020 6:52 PM
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
